<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>

<%@ taglib uri="http://www.springframework.org/tags" prefix="s"%>
<%@ taglib uri="http://www.springframework.org/tags/form" prefix="form"%>

<!DOCTYPE html>
<html lang="en">
<head>
<title><s:message code="app.title" /></title>
<%@ include file="Include.jsp"%>
<script type="text/javascript">
	
	$(document).ready(function() {
		$("#jobregister").focus();	
	});
	
	$("[data-toggle=modal]").click(function(ev) {
	    ev.preventDefault();
	    
	    // load the url and show modal on success
	    $( $(this).attr('data-target') ).load($(this).attr("href"), function() {
	    	$($(this).attr('data-target')).modal("show"); 
	    }); 
	});	   
	
//	* Open JSP Page in New Window * 
// 	function doSubmit() {
// 		window.open("AddPkgcarting");
// 	}
</script>
</head>
<body>
	<div class="container">
		<%@ include file="Menu.jsp"%>
		<h2><s:message code="dateManagerForm.addheader" /></h2>
		<hr>
		<form:form id="cancelForm">
		</form:form>
		<form:form class="form-horizontal" method="post" name="dateManager" id="dateManagerForm" commandName="DatemanagerForm"
	           modelAttribute="dateManagerForm" >
			<s:bind path="*">
				<c:if test="${status.error}">
					<div id="message" class="text-error"><b>Please check your inputs.</b></div>
				</c:if>
			</s:bind>
			<table class="table table-bordered">
				<tr>
					<th><form:label path="jobregister"><s:message code="dateManagerForm.jobnoid" /></form:label></th>
					<td>
						<form:select path="jobregister" cssClass="input-large" tabindex="1">
							<form:option value="">- Select -</form:option> 
							<form:options items="${jobnoList}" itemLabel="jobno" itemValue="jobnoid" />
						</form:select>
<%-- 						<form:errors cssClass="text-error" path="jobno" /> --%>
					&nbsp;&nbsp;
					<th><form:label path="salesperson"><s:message code="dateManagerForm.salesperson" /></form:label></th>
					<td>
						<form:input path="salesperson" cssClass="input-small" id="salesperson" type="text" tabindex="18" />
<%-- 					<form:errors cssClass="text-error" path="unnohumodity" /> --%>
					</td>
					<th><form:label path="clearanceat"><s:message code="dateManagerForm.clearanceat" /></form:label></th>
					<td>
						<form:input path="clearanceat" cssClass="input-small" id="clearanceat" type="text" tabindex="18" />
<%-- 					<form:errors cssClass="text-error" path="unnohumodity" /> --%>
					</td>
					<th><form:label path="activity"><s:message code="dateManagerForm.activity" /></form:label></th>
					<td>
						<form:input path="activity" cssClass="input-large" id="activity" type="text" tabindex="18" />
<%-- 					<form:errors cssClass="text-error" path="unnohumodity" /> --%>
					</td>
				</tr>
			</table>
<!-- Start Vessel Detail's Fieldset -->
			<fieldset>
			<legend>
				<a href="#" data-toggle="collapse" data-target="#vesselUpdation">
					<i class="icon-chevron-up"></i>
				</a>
				Shipment Updation
			</legend>
		<div id="vesselUpdation" class="collapse in">
<!-- Start BKG Vessel Table Detail -->
			<table class="table table-bordered">
				<tr>
					<th><form:label path="vslid" ><s:message code="dateManagerForm.bkgvsl"></s:message></form:label></th>
					<td>
					<form:select path="vslid" cssClass="input-large" tabindex="22">
						<form:option value="">- Select -</form:option>
						<form:options items="${vesselList}" itemLabel="vesselname" itemValue="vesselid" />	
					</form:select>
					<th><form:label path="cutoff"><s:message code="dateManagerForm.bkgvslcutoff"/></form:label></th>
					<td>
					<form:input path="cutoff" cssClass="input-medium" id="bkgvslcutoff" type="text" placeholder="DD/MM/YYYY" tabindex="18"/>
<%-- 					<form:errors cssClass="text-error" path="unnohumodity" /> --%>
					</td>
					<th><form:label path="etd"><s:message code="dateManagerForm.bkgvsletd"/></form:label></th>
					<td>
					<form:input path="cutoff" cssClass="input-medium" id="bkgvsletd" type="text" placeholder="DD/MM/YYYY" tabindex="18"/>
<%-- 					<form:errors cssClass="text-error" path="unnohumodity" /> --%>
					</td>
					<th><form:label path="routine"><s:message code="dateManagerForm.routine"/></form:label></th>
					<td>
					<form:input path="routine" cssClass="input-medium" id="routine" type="text" tabindex="18"/>
<%-- 					<form:errors cssClass="text-error" path="unnohumodity" /> --%>
					</td>
				</tr>
<!-- End BKG Vessel Table Detail -->
<!-- Start DSP Vessel Table Detail -->		
				<tr>
					<th><form:label path="vslid" ><s:message code="dateManagerForm.dspvsl"></s:message></form:label></th>
					<td>
					<form:select path="vslid" cssClass="input-large" tabindex="22">
						<form:option value="">- Select -</form:option>
						<form:options items="${vesselList}" itemLabel="vesselname" itemValue="vesselid" />	
					</form:select>
					<th><form:label path="cutoff"><s:message code="dateManagerForm.dspvslcutoff"/></form:label></th>
					<td>
					<form:input path="cutoff" cssClass="input-medium" id="dspvslcutoff" type="text" placeholder="DD/MM/YYYY" tabindex="18"/>
<%-- 					<form:errors cssClass="text-error" path="unnohumodity" /> --%>
					</td>
					<th><form:label path="etd"><s:message code="dateManagerForm.bkgvsletd"/></form:label></th>
					<td>
					<form:input path="etd" cssClass="input-medium" id="dspvsletd" type="text" placeholder="DD/MM/YYYY" tabindex="18"/>
<%-- 					<form:errors cssClass="text-error" path="unnohumodity" /> --%>
					</td>
					<th><form:label path="transittime"><s:message code="dateManagerForm.transittime"/></form:label></th>
					<td>
					<form:input path="transittime" cssClass="input-medium" id="transittime" type="text" tabindex="18" placeholder="0 Days"/>
<%-- 					<form:errors cssClass="text-error" path="unnohumodity" /> --%>
					</td>
				</tr>
<!-- End DSP Vessel Table Detail -->
<!-- Start ONB Vessel Table Detail -->
				<tr>
					<th><form:label path="vslid" ><s:message code="dateManagerForm.onbvsl"></s:message></form:label></th>
					<td>
					<form:select path="vslid" cssClass="input-large" tabindex="22">
						<form:option value="">- Select -</form:option>
						<form:options items="${vesselList}" itemLabel="vesselname" itemValue="vesselid" />	
					</form:select>
					<th><form:label path="etd"><s:message code="dateManagerForm.onbvsletd"/></form:label></th>
					<td>
					<form:input path="etd" cssClass="input-medium" id="onbvsletd" type="text" placeholder="DD/MM/YYYY" tabindex="18"/>
<%-- 					<form:errors cssClass="text-error" path="unnohumodity" /> --%>
					</td>
					<th><form:label path="etadstdate"><s:message code="dateManagerForm.etadstdate"/></form:label></th>
					<td>
					<form:input path="etadstdate" cssClass="input-medium" id="etadstdate" type="text" placeholder="DD/MM/YYYY" tabindex="18"/>
<%-- 					<form:errors cssClass="text-error" path="unnohumodity" /> --%>
					</td>
					<th><form:label path="status"><s:message code="dateManagerForm.status"/></form:label></th>
					<td>
					<form:input path="status" cssClass="input-medium" id="status" type="text" tabindex="18"/>
<%-- 					<form:errors cssClass="text-error" path="unnohumodity" /> --%>
					</td>
				</tr>
<!-- End ONB Vessel Detail's Fieldset -->	
			</table>	
		</div>
		</fieldset>
<!-- End Vessel Detail's Fieldset -->
<!-- Start Forwarding Date Manager Table -->
<br>
	<fieldset>
		<legend>
			<a href="#" data-toggle="collapse" data-target="#forwardingUpdation">
				<i class="icon-chevron-up"></i>
			</a>
			Forwarding Date Updation
		</legend>
		<div id="forwardingUpdation" class="collapse in">
			<table class="table table-bordered">
				<tr>
					<th><form:label path="bookingdate"><s:message code="dateManagerForm.bookingdate"/></form:label></th>
					<td>
					<form:input path="bookingdate" cssClass="input-medium" id="bookingdate" maxlength="10" type="text" placeholder="DD/MM/YYYY" tabindex="1"/>
<%-- 					<form:errors cssClass="text-error" path="bookingno" /> --%>
					</td>
					<th><form:label path="dgsubnitdate"><s:message code="dateManagerForm.dgsubnitdate"/></form:label></th>
					<td>
					<form:input path="dgsubnitdate" cssClass="input-medium" id="dgsubnitdate" maxlength="10" type="text" placeholder="DD/MM/YYYY" tabindex="4"/>
<%-- 					<form:errors cssClass="text-error" path="bookingno" /> --%>
					</td>
					<th><form:label path="bltoclientdate"><s:message code="dateManagerForm.bltoclientdate"/></form:label></th>
					<td>
					<form:input path="bltoclientdate" cssClass="input-medium" id="bltoclientdate" maxlength="10" type="text" placeholder="DD/MM/YYYY" tabindex="1"/>
<%-- 					<form:errors cssClass="text-error" path="bookingno" /> --%>
					</td>
				</tr>
				<tr>
					<th><form:label path="pickupdate"><s:message code="dateManagerForm.pickupdate"/></form:label></th>
					<td>
					<form:input path="pickupdate" cssClass="input-medium" id="pickupdate" maxlength="10" type="text" placeholder="DD/MM/YYYY" tabindex="1"/>
<%-- 					<form:errors cssClass="text-error" path="pickupdate" /> --%>
					</td>
				<th><form:label path="sealcovertolinedate"><s:message code="dateManagerForm.sealcovertolinedate"/></form:label></th>
					<td>
					<form:input path="sealcovertolinedate" cssClass="input-medium" id="sealcovertolinedate" maxlength="10" type="text" placeholder="DD/MM/YYYY" tabindex="1"/>
<%-- 				<form:errors cssClass="text-error" path="bookingno" /> --%>
				</td>
				<th><form:label path="prealertsentondate"><s:message code="dateManagerForm.prealertsentondate"/></form:label></th>
					<td>
					<form:input path="prealertsentondate" cssClass="input-medium" id="prealertsentondate" maxlength="10" type="text" placeholder="DD/MM/YYYY" tabindex="4"/>
<%-- 					<form:errors cssClass="text-error" path="bookingno" /> --%>
					</td>
				</tr>
				<tr>
					<th><form:label path="stuffingdate"><s:message code="dateManagerForm.stuffingdate"/></form:label></th>
					<td>
					<form:input path="stuffingdate" cssClass="input-medium" id="stuffingdate" maxlength="10" type="text" placeholder="DD/MM/YYYY" tabindex="4"/>
<%-- 					<form:errors cssClass="text-error" path="bookingno" /> --%>
					</td>
					<th><form:label path="cmltocarrierdate"><s:message code="dateManagerForm.cmltocarrierdate"/></form:label></th>
					<td>
					<form:input path="cmltocarrierdate" cssClass="input-medium" id="cmltocarrierdate" maxlength="10" type="text" placeholder="DD/MM/YYYY" tabindex="4"/>
<%-- 					<form:errors cssClass="text-error" path="bookingno" /> --%>
					</td>
					<th><form:label path="surmsgsentondate"><s:message code="dateManagerForm.surmsgsentondate"/></form:label></th>
					<td>
					<form:input path="surmsgsentondate" cssClass="input-medium" id="surmsgsentondate" maxlength="10" type="text" placeholder="DD/MM/YYYY" tabindex="4"/>
<%-- 					<form:errors cssClass="text-error" path="bookingno" /> --%>
					</td>
				</tr>
				<tr>
					<th><form:label path="loadlistdate"><s:message code="dateManagerForm.loadlistdate"/></form:label></th>
					<td>
					<form:input path="loadlistdate" cssClass="input-medium" id="loadlistdate" maxlength="10" type="text" placeholder="DD/MM/YYYY" tabindex="4"/>
<%-- 					<form:errors cssClass="text-error" path="bookingno" /> --%>
					</td>
					<th><form:label path="siensacddate"><s:message code="dateManagerForm.siensacddate"/></form:label></th>
					<td>
					<form:input path="siensacddate" cssClass="input-medium" id="siensacddate" maxlength="10" type="text" placeholder="DD/MM/YYYY" tabindex="4"/>
<%-- 					<form:errors cssClass="text-error" path="bookingno" /> --%>
					</td>
					<th><form:label path="destdestuffdate"><s:message code="dateManagerForm.destdestuffdate"/></form:label></th>
					<td>
					<form:input path="destdestuffdate" cssClass="input-medium" id="destdestuffdate" maxlength="10" type="text" placeholder="DD/MM/YYYY" tabindex="4"/>
					</td>
				</tr>
				<tr>
					<th><form:label path="despatchdate"><s:message code="dateManagerForm.despatchdate"/></form:label></th>
					<td>
					<form:input path="despatchdate" cssClass="input-medium" id="despatchdate" maxlength="10" type="text" placeholder="DD/MM/YYYY" tabindex="4"/>
<%-- 					<form:errors cssClass="text-error" path="bookingno" /> --%>
					</td>
					<th><form:label path="bldrafttoclientdate"><s:message code="dateManagerForm.bldrafttoclientdate"/></form:label></th>
					<td>
					<form:input path="bldrafttoclientdate" cssClass="input-medium" id="bldrafttoclientdate" maxlength="10" type="text" placeholder="DD/MM/YYYY" tabindex="4"/>
<%-- 					<form:errors cssClass="text-error" path="bookingno" /> --%>
					</td>
					<th><s:message code="dateManagerForm.timeframe"/></th>
					<td>
						<form:input path="timeframe" cssClass="input-small" id="fwtimeframe" maxlength="10" type="text" placeholder="0 Days" tabindex="4"/>
						&nbsp;&nbsp;&nbsp; (Desp. - Sailing)						
					</td>
				</tr>
				<tr>
					<th><form:label path="gateinddate"><s:message code="dateManagerForm.gateinddate"/></form:label></th>
					<td>
					<form:input path="gateinddate" cssClass="input-medium" id="gateinddate" maxlength="10" type="text" placeholder="DD/MM/YYYY" tabindex="4"/>
<%-- 					<form:errors cssClass="text-error" path="bookingno" /> --%>
					</td>
					<th><form:label path="bldrafttolinedate"><s:message code="dateManagerForm.bldrafttolinedate"/></form:label></th>
					<td>
					<form:input path="bldrafttolinedate" cssClass="input-medium" id="bldrafttolinedate" maxlength="10" type="text" placeholder="DD/MM/YYYY" tabindex="4"/>
<%-- 					<form:errors cssClass="text-error" path="bookingno" /> --%>
					</td>
					<th rowspan="2"><form:label path="fwremarks"><s:message code="dateManagerForm.fwremarks"/></form:label></th>					
					<td rowspan="2">
					<form:textarea path="fwremarks" rows="3" id="fwremarks" cssClass="input-large" />
<%-- 					<form:errors cssClass="text-error" path="address" /> --%>
					</td>
				</tr>
				<tr>
					<th><form:label path="hazapprovaldate"><s:message code="dateManagerForm.hazapprovaldate"/></form:label></th>
					<td>
					<form:input path="hazapprovaldate" cssClass="input-medium" id="hazapprovaldate" maxlength="10" type="text" placeholder="DD/MM/YYYY" tabindex="4"/>
<%-- 					<form:errors cssClass="text-error" path="bookingno" /> --%>
					</td>
					<th><form:label path="isfdate"><s:message code="dateManagerForm.isfdate"/></form:label></th>
					<td>
					<form:input path="isfdate" cssClass="input-medium" id="isfdate" maxlength="10" type="text" placeholder="DD/MM/YYYY" tabindex="4"/>
<%-- 					<form:errors cssClass="text-error" path="bookingno" /> --%>
					</td>
				</tr>
			</table>
		</div>
	</fieldset>
<!-- End Forwarding Date Manager Table -->
<!-- Start Clearance Date Manager Table -->
<br>
		<fieldset>
			<legend onblur="arguments">
				<a href="#" data-toggle="collapse" data-target="#clearanceUpdation">
					<i class="icon-chevron-up"></i>
				</a>
				Clearance Date Updation
			</legend>
		<div id="clearanceUpdation" class="collapse in">
			<table class="table table-bordered">
				<tr>
					<th><form:label path="docfromclientdate"><s:message code="dateManagerForm.docfromclientdate"/></form:label></th>
					<td>
					<form:input path="docfromclientdate" cssClass="input-medium" id="docfromclientdate" maxlength="10" type="text" placeholder="DD/MM/YYYY" tabindex="4"/>
<%-- 					<form:errors cssClass="text-error" path="bookingno" /> --%>
					</td>
					<th><form:label path="docrcpttoagent"><s:message code="dateManagerForm.docrcpttoagent"/></form:label></th>
					<td>
					<form:input path="docrcpttoagent" cssClass="input-medium" id="docrcpttoagent" maxlength="10" type="text" placeholder="DD/MM/YYYY" tabindex="4"/>
<%-- 					<form:errors cssClass="text-error" path="bookingno" /> --%>
					</td>
					<th><s:message code="dateManagerForm.timeframe"/></th>
					<td>
						<form:input path="timeframe" cssClass="input-small" id="cltimeframe" maxlength="10" type="text" placeholder="0 Days" tabindex="4"/>
						&nbsp;&nbsp;&nbsp; (Carting - LEO)						
					</td>
				</tr>
				<tr>
					<th><form:label path="docsenttoagentdate"><s:message code="dateManagerForm.docsenttoagentdate"/></form:label></th>
					<td>
					<form:input path="docsenttoagentdate" cssClass="input-medium" id="docsenttoagentdate" maxlength="10" type="text" placeholder="DD/MM/YYYY" tabindex="4"/>
<%-- 					<form:errors cssClass="text-error" path="bookingno" /> --%>
					</td>
					<th><form:label path="doctoclientdate"><s:message code="dateManagerForm.doctoclientdate"/></form:label></th>
					<td>
					<form:input path="doctoclientdate" cssClass="input-medium" id="doctoclientdate" maxlength="10" type="text" placeholder="DD/MM/YYYY" tabindex="4"/>
<%-- 					<form:errors cssClass="text-error" path="bookingno" /> --%>
					</td>
					<th rowspan="3"><form:label path="clremarks"><s:message code="dateManagerForm.clremarks"/></form:label></th>					
					<td rowspan="3">
					<form:textarea path="clremarks" rows="6" id="clremarks" cssClass="input-large"/>
<%-- 					<form:errors cssClass="text-error" path="address" /> --%>
					</td>
				</tr>
				<tr>
					<th><form:label path="totalpkgcarteddate"><s:message code="dateManagerForm.totalpkgcarteddate"/></form:label></th>
					<td>					
					<form:input path="totalpkgcarteddate" cssClass="input-medium" id="totalpkgcarteddate" maxlength="10" type="text" 
					placeholder="DD/MM/YYYY" tabindex="4" />
<%-- 					<form:errors cssClass="text-error" path="bookingno" /> --%>
					</td>
					<th><form:label path="epcopytoagentdate"><s:message code="dateManagerForm.epcopytoagentdate"/></form:label></th>
					<td>
					<form:input path="epcopytoagentdate" cssClass="input-medium" id="epcopytoagentdate" maxlength="10" type="text" placeholder="DD/MM/YYYY" tabindex="4"/>
<%-- 					<form:errors cssClass="text-error" path="bookingno" /> --%>
					</td>
				</tr>
				<tr>
					<th><form:label path="leodate"><s:message code="dateManagerForm.leodate"/></form:label></th>
					<td>
					<form:input path="leodate" cssClass="input-medium" id="leodate" maxlength="10" type="text" placeholder="DD/MM/YYYY" tabindex="4"/>
<%-- 					<form:errors cssClass="text-error" path="bookingno" /> --%>
					</td>
					<th><form:label path="epcopytoclientdate"><s:message code="dateManagerForm.epcopytoclientdate"/></form:label></th>
					<td>
					<form:input path="epcopytoclientdate" cssClass="input-medium" id="epcopytoclientdate" maxlength="10" type="text" placeholder="DD/MM/YYYY" tabindex="4"/>
<%-- 					<form:errors cssClass="text-error" path="bookingno" /> --%>
					</td>
				</tr>
			</table>
		</div>
		</fieldset>
<!-- End Clearance Date Manager Table -->			
		<br>
			<button class="btn btn-primary" type="submit" formaction="AddFCLDatemanager" formmethod="post"><s:message code="app.add" /></button>
			&nbsp;&nbsp; <button class="btn" type="submit" formaction="ListJobRegister" form="cancelForm" formmethod="get"><s:message code="app.cancel" /></button>
		</form:form>
	</div>
</body>
</html>